package org.example.diet_compass.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.example.diet_compass.domain.CommentLikes;

/**
* @author 86135
* @description 针对表【comment_likes(评论点赞表)】的数据库操作Mapper
* @createDate 2025-03-03 20:51:32
* @Entity .domain.CommentLikes
*/
public interface CommentLikesMapper extends BaseMapper<CommentLikes> {

    @Select("select * from comment_likes where user_id=#{userId} and comment_id = #{commentId}")
    Integer getByUserIdAndCommentId(int userId, Long commentId);

    @Delete("delete from comment_likes where user_id=#{userId} and comment_id = #{commentId}")
    void removeByUserIdAndCommentId(int userId, Long commentId);
}




